<html>
<head>
	<?php $this->load->view('config/head');?>
</head>
<body>
	<?php $this->load->view('config/awal_body');?>
	
	<h3><?php echo $mode?> Menu</h3>
	<a href="<?php echo site_url()?>mg_menu/index" class="btn">List menu</a>
	<br/>
	<br/>
	
	<form method="post" action="<?php echo site_url() ?>mg_menu/<?php echo $action?>" class="form-horizontal">
		<input type="hidden" name="id_menu_tmp" value="<?php echo @$detail[0]['id_menu']?>" />
		<div class="control-group">
			<label class="control-label" for="menu">Menu</label>
			<div class="controls">
				<select name="id_menu">
					<option value="0">Pilih menu</option>
					<?php if (@$set):?>
						<?php foreach ($set as $row):?>
							
							<?php if ($row['id_menu'] == @$detail[0]['id_menu']):?>
								<?php $selected =  'selected="selected"' ?>
							<?php else :?>
								<?php $selected =  '' ?>
							<?php endif;?>
							<option value="<?php echo $row['id_menu'] ?>" <?php echo $selected ?> ><?php echo $row['nama_menu'] ?></option>
						<?php endforeach?>
					<?php endif?>
				</select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="title">Title</label>
			<div class="controls">
			  <input type="text" name="title_menu" value="<?php echo @$detail[0]['title_menu']?>" class="span9" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="content">Content</label>
			<div class="controls">
				<textarea name="content_menu" class="ckeditor"><?php echo @$detail[0]['content_menu']?></textarea>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label" for="button">&nbsp;</label>
			<div class="controls">
				<input type="submit" name="submit" value="Save" class="btn btn-primary" />
				<input type="reset" value="Reset" class="btn" />
			</div>
		</div>
	</form>
	
	<?php $this->load->view('config/akhir_body');?>
</body>
</html>

